package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.ArrayList;

import net.wxxr.http.interfaces.IJsonParser;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class ProductListBean  implements Serializable, IJsonParser{
	/**
	 * "perv_cursor": 0,
    "data_list": [
        {
            "status": 0,
            "product_id": 2,
            "name": "商品1",
            "is_debate": true,
            "created_time": 1430363784,
            "list_pic": {
                "url": "http://imgs.ykdllmyr.com/fxs/2015/3/23/qqZ42isga6XF4HYWQJYKe3.jpeg",
                "width": 750,
                "file_id": 100386,
                "height": 588
            },
            "price": 20,
            "debate": {
                "debate_begin_time": 1427188230,
                "debate_end_time": 1431889500,
                "debate_price": 2,
                "debate_info": "折扣方式"
            },
            "store_id": 100100130
        },
        {
            "status": 0,
            "product_id": 1,
            "name": "商品1",
            "is_debate": false,
            "created_time": 1430363762,
            "list_pic": {
                "url": "http://imgs.ykdllmyr.com/fxs/2015/3/23/qqZ42isga6XF4HYWQJYKe3.jpeg",
                "width": 750,
                "file_id": 100386,
                "height": 588
            },
            "price": 10,
            "store_id": 100100130
        }
    ],
    "next_cursor": 2,
    "total_number": 2
	 */
	private static final long serialVersionUID = 7582322602485134956L;
	private int next_cursor;
	private int total_number;
	private ArrayList<ProductBean>  data_list;
	private String desc ;
	private String error ;
	private StoreInfoBean store;
	public StoreInfoBean getStore() {
		return store;
	}
	public int getNext_cursor() {
		return next_cursor;
	}
	public int getTotal_number() {
		return total_number;
	}
	public ArrayList<ProductBean> getData_list() {
		return data_list;
	}
	public String getDesc() {
		return desc;
	}
	public String getError() {
		return error;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, ProductListBean.class);
		}
		return null;
	}
}
